﻿#include "StaticProperties.h"

/**
 * @brief 构造函数
 */

bool StaticProperties::isProductTesting =false;//产物检测
int  StaticProperties::productSyringStep;//产物注射器步骤
QDateTime StaticProperties::productSyringStartTime;

QVariantList StaticProperties::logInfo;//通信日志
QStringList StaticProperties::runningList;//正在运行中的电机(目前只有纯化中的注射器和转盘)

bool StaticProperties::heartMsg;

int StaticProperties::currentExpModule;//当前实验模块
QDateTime StaticProperties::stepStartTime;//单步开始时间,方便计算每步具体执行时长
QDateTime StaticProperties::unionStepStartTime;
double StaticProperties::totalExpTime=0;//当前实验需要的总时间

int StaticProperties::expStatus;//实验状态 0空闲 1实验中 2暂停 3故障
QMap<int,QVariantMap> StaticProperties::expSendList;
QMap<int,QVariantMap> StaticProperties::expConcurrencySendList;
QList<int> StaticProperties::needRunUnionNumberList;

QList<QMap<int,QVariantMap>> StaticProperties::expLogList;
QMap<int,QVariantMap> StaticProperties::expConcurrencyLogList;

int StaticProperties::currentExpType;//实验类型 0:总流程 1:放靶 2:打靶 3:转靶 4:纯化
QString StaticProperties::currentExpName;//选中的实验名称
QString StaticProperties::currentExpConsumables;//选中的耗材类型
int StaticProperties::currentStep;  //当前执行中实验步骤
int StaticProperties::expStep;//发送解析完实验步骤
int StaticProperties::expStartStep;//实验启动步数
int StaticProperties::maxStep;
int StaticProperties::expUnionStep;
bool StaticProperties::isConcurrency;
//放靶检测
//0靶材罐有无 1气泵压力
QVariantMap StaticProperties::releasseTargetStatus;

//打靶检测
//0靶材罐有无 1靶材对接 2气泵 3水泵
QVariantMap StaticProperties::practiceTargetStatus;

//转靶检测
//0靶材罐是否打开 1靶材片是否吸取 2溶靶瓶有无
QVariantMap StaticProperties::shiftingTargetStatus;

//纯化检测
//0 左压紧 1右压紧 2耗材触点 3废液瓶有无 4产物瓶有无
QVariantMap StaticProperties::purifyingStatus;

//管道状态检测
//-1 未知状态 0正常状态 1第一次经过 2第二次经过 3故障
QVariantMap StaticProperties::pipeStatus;

double StaticProperties::dataThreshold;
QString StaticProperties::dataThresholdType;

bool StaticProperties::firstConnect;

bool StaticProperties::isWait=false;

QList<int> StaticProperties::continueModule={
  0,0
};

bool StaticProperties::isForcedStop=false;

int StaticProperties::softType;//0所有模块 1打靶 2纯化

bool StaticProperties::expRecovery=false;

bool StaticProperties::finishInPause=false;

QList<int> StaticProperties::expStartStepList;

bool StaticProperties::existSoft;
bool StaticProperties::isWaitStep;
QMap<int,int> StaticProperties::concurrencyStepMap;
bool StaticProperties::isWaitError;
